package com.xinghuo.usercare.mapper.impl;


import com.xinghuo.usercare.mapper.IUserMapper;
import com.xinghuo.usercare.dao.domain.User; 
/**
 * 这个是Mapper接口方式,接口的方法名字就直接对应User.xml里面的SQL ID.<p>
 * 在实现类里面实现并直接使用接口,其实这个接口的实现就是User.xml
 * @author Administrator
 *
 */
public class UserMapper implements IUserMapper {
	private IUserMapper userMapper;

	@Override
	public User queryUserById(int id) {
		return userMapper.queryUserById(id);
	}

	@Override
	public void insertUser(User user) {
		System.out.println("userMapper insertUser");
		userMapper.insertUser(user);
	}

	@Override
	public void updateUser(User user) {
		System.out.println("userMapper updateUser");
		userMapper.updateUser(user);
	}

	public IUserMapper getUserMapper() {
		return userMapper;
	}

	public void setUserMapper(IUserMapper userMapper) {
		this.userMapper = userMapper;
	}

}
